Fiexed some errors with the package - #2
Merged
Conversation
stplasim
commented
Oct 5, 2020
Contributor
- Fixed import errors
- Fixed typescript compilation error
- Fixed linting errors
alexlanz
requested changes
Oct 5, 2020
| let component = "import React from 'react'\n" | ||
| component += "import { IconProps } from './types'\n" | ||
| component += `const ${name}: React.FC<IconProps> = (props) => (` | ||
| component += `const ${name}: React.FC<IconProps> = (props: IconProps):any => (` |
Member
There was a problem hiding this comment.
Are you sure that this is required? @mmalfertheiner do we need here a return value?
Member
There was a problem hiding this comment.
Simon, React.FC is an interface, which defines the parameters and the return value. Thats why the original version was correct.
| @@ -0,0 +1,10 @@ | |||
| import React from 'react' | |||
| import { IconProps } from './types' | |||
| const Icon360: React.FC<IconProps> = (props: IconProps): any => ( | |||
Member
There was a problem hiding this comment.
Could we add an additonal empty line between the imports and the component declaration?
| "ts-jest": "^26.4.1", | ||
| "typescript": "^4.0.3" | ||
| "typescript": "^4.0.3", | ||
| "react": "^16.13.1", |
Member
There was a problem hiding this comment.
Why is react and react-com here included twice?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.